import java.sql.*;

public class Test2 {
	public static void main(String args[]) {

		  Connection connection = null;
		  Statement statement = null;

		  String url = "jdbc:postgresql://localhost:5432/";
		  String db = "CATDAT";
		  String driver = "org.postgresql.Driver";
		  String user = "postgres";
		  String pass = "dast";

		  try {
		  Class.forName(driver); 																// Initialisierung Treiber
		  connection = DriverManager.getConnection(url + db, user, pass);						// Verbindungsaufbau zu Datenbank
		  
		  statement = connection.createStatement();

		  String update = "UPDATE iket.event_earthquake SET depth_0_bis_15km='1' WHERE depth<=15";
		  statement.executeUpdate(update);

		  System.out.println("Table updated.");

		  } catch (Exception e) {
		  System.out.println(e);
		  }
		  }
}
